﻿using Manon.ConfigCenter.Web.ApplicationCore.Dtos.Environment;
using Manon.Core.Commons;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Manon.ConfigCenter.Web.ApplicationCore.Interfaces
{
    public interface IEnvironmentService
    {
        /// <summary>
        /// 获取环境变量列表
        /// </summary>
        /// <returns></returns>
        Task<List<EnvironmentOutput>> GetEnvironmentListAsync();


        /// <summary>
        /// 获取环境变量信息
        /// </summary>
        /// <param name="EnvId"></param>
        /// <returns></returns>
        Task<EnvironmentOutput> GetEnvironmentOutput(int EnvId);


        /// <summary>
        /// 保存环境
        /// </summary>
        /// <param name="Input"></param>
        /// <returns></returns>
        Task<Result<EnvironmentOutput>> SaveEnvironment(SaveEnvironmentInput Input);


        /// <summary>
        /// 删除环境
        /// </summary>
        /// <param name="Input"></param>
        /// <returns></returns>
        Task<Result> DelEnvironment(int envId);

        /// <summary>
        /// 获取环境变量简要信息列表
        /// </summary>
        /// <returns></returns>
        Task<List<EnvironmentSimpleOutput>> GetEnvironmentSimpleListAsync();


        /// <summary>
        /// 获取所有环境变量简要信息列表 无需权限控制的
        /// </summary>
        /// <returns></returns>
        Task<List<EnvironmentSimpleOutput>> GetAllEnvironmentSimpleListAsync();
    }
}
